package com.lx.demo.sync.jobhandler;


import com.lx.demo.sync.service.HelloService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * @author wcy
 */
@Slf4j
@Component
@JobHandler("demoJobHandler")
public class DemoJobHandler  extends IJobHandler {

    @Autowired
    HelloService helloService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        helloService.methodA();
        return ReturnT.SUCCESS;
    }
}
